package com.westcom.healthmate.bean;

import com.westcom.healthmate.common.constants.Constants;
import lombok.Getter;
import lombok.Setter;


@Getter
@Setter
public class MiraToken
{
    private String token;
    private long genDate;

    public boolean isExpired()
    {
        if(genDate + Constants.MIRE_TOKEN_LIFE_TIME >=System.currentTimeMillis())
        {
            return false;
        }
        return true;
    }
    public MiraToken(String token)
    {
        this.token = token;
        genDate = System.currentTimeMillis()-1000;
    }
}
